home *** CD-ROM | disk | FTP | other *** search
- global gpButtonShiftPixels
-
- on initCustomButtons
- set gpButtonShiftPixels to 1
- end
-
- on customButtonBehavior theSprite
- set the locH of sprite theSprite to the locH of sprite theSprite + gpButtonShiftPixels
- set the locV of sprite theSprite to the locV of sprite theSprite + gpButtonShiftPixels
- set buttonIsPressed to 1
- updateStage()
- repeat while the stillDown
- if rollOver(theSprite) = 1 then
- if buttonIsPressed = 0 then
- set the locH of sprite theSprite to the locH of sprite theSprite + gpButtonShiftPixels
- set the locV of sprite theSprite to the locV of sprite theSprite + gpButtonShiftPixels
- set buttonIsPressed to 1
- end if
- else
- if buttonIsPressed = 1 then
- set the locH of sprite theSprite to the locH of sprite theSprite - gpButtonShiftPixels
- set the locV of sprite theSprite to the locV of sprite theSprite - gpButtonShiftPixels
- set buttonIsPressed to 0
- end if
- end if
- updateStage()
- end repeat
- if buttonIsPressed = 1 then
- set the locH of sprite theSprite to the locH of sprite theSprite - gpButtonShiftPixels
- set the locV of sprite theSprite to the locV of sprite theSprite - gpButtonShiftPixels
- updateStage()
- end if
- end
-
- on customButtonBehaviorMultiple theSpriteList
- repeat with i = 1 to count(theSpriteList)
- set theSprite to getAt(theSpriteList, i)
- set the locH of sprite theSprite to the locH of sprite theSprite + gpButtonShiftPixels
- set the locV of sprite theSprite to the locV of sprite theSprite + gpButtonShiftPixels
- set gpButtonIsPressed to 1
- end repeat
- updateStage()
- set theMasterSprite to getAt(theSpriteList, 1)
- repeat while the stillDown
- if rollOver(theMasterSprite) = 1 then
- if gpButtonIsPressed = 0 then
- repeat with i = 1 to count(theSpriteList)
- set theSprite to getAt(theSpriteList, i)
- set the locH of sprite theSprite to the locH of sprite theSprite + gpButtonShiftPixels
- set the locV of sprite theSprite to the locV of sprite theSprite + gpButtonShiftPixels
- set gpButtonIsPressed to 1
- end repeat
- end if
- else
- if gpButtonIsPressed = 1 then
- repeat with i = 1 to count(theSpriteList)
- set theSprite to getAt(theSpriteList, i)
- set the locH of sprite theSprite to the locH of sprite theSprite - gpButtonShiftPixels
- set the locV of sprite theSprite to the locV of sprite theSprite - gpButtonShiftPixels
- set gpButtonIsPressed to 0
- end repeat
- end if
- end if
- updateStage()
- end repeat
- if gpButtonIsPressed = 1 then
- repeat with i = 1 to count(theSpriteList)
- set theSprite to getAt(theSpriteList, i)
- set the locH of sprite theSprite to the locH of sprite theSprite - gpButtonShiftPixels
- set the locV of sprite theSprite to the locV of sprite theSprite - gpButtonShiftPixels
- end repeat
- updateStage()
- end if
- end
-